<template>
  <div class="comment" v-if="Object.keys(commentInfo).length !==0">
    <div class="info-header">
      <div class="title">用户评价</div>
      <div class="more">更多<i class="arrow-right"></i></div>
    </div>
    <div class="info-user">
      <img :src="commentInfo.user.avatar" alt="">
      <span>{{commentInfo.user.uname}}</span>
    </div>
    <div class="info-detail">
      <p class="content">{{commentInfo.content}}</p>
      <div class="other">
        <span class="date">{{commentInfo.created *1000 | dateFormat('yyyy-MM-dd hh:mm:ss')}}</span>
        <span>{{commentInfo.style}}</span>
      </div>
      <div class="imgs">
        <img :src="item" v-for="(item, index) in commentInfo.images" :key="index">
      </div>
    </div>
  </div>
</template>

<script scoped>
export default {
   name: 'DetailCommentInfo',
   props: {
     commentInfo: {
       type: Object,
       default: {}
     }
   },
   data() {
       return {}
   },
   components: {}
}
</script>

<style lang='less' scoped>
  .comment {
    padding: .1rem .24rem;
    color:#333;
    border-bottom: .1rem solid #f2f5f8;
    .info-header {
      .flex();
      justify-content: space-between;
      .title {
        font-size: .3rem;
      }
      .more {
        font-size: .26rem;
       .arrow-right {
          .arrow-right();
        }
      }
    }
    .info-user {
      // padding:.2rem 0 .1rem;
      height: 1.14rem;
      line-height: 1.14rem;
      img {
        width: 0.84rem;
        height: 0.84rem;
        border-radius: 50%;
        vertical-align: middle;
      }
      span {
        margin-left: 0.2rem;
        font-size: .3rem;
        vertical-align: middle;
      }
    }
    .info-detail {
      padding: 0 .1rem .3rem;
      .content {
        color: #777;
        line-height: 1.5;
      }
      .other {
        font-size: .24rem;
        color: #999;
        margin-top: .2rem;
        .date {
          margin-right: 0.16rem;
        }
      }
      .imgs {
        padding-top: 0.15rem;
        img {
          width: 1.4rem;
          height: 1.4rem;
          margin-right: 0.1rem;
        }
      }
    }
  }
</style>
